/**
 * @file   1144.cpp
 * @author Shuang Hu <hsmath@ubuntu>
 * @date   Sun May 30 19:07:50 2021
 * 
 * @brief  PAT 1144:Using set in STL
 * 
 * 
 */
#include<iostream>
#include<set>
using namespace std;
int main(){
    int N;
    cin>>N;
    set<int> S;
    for(int i=0;i<N;i++){
	int d;
	cin>>d;
	if(d>0)
	    S.insert(d);
    }
    while(1){
	static int i=1;
	if(S.count(i)==0){
	    cout<<i<<endl;
	    break;
	}
	i++;
    }
}
